home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / C++ AppleLink Messages / CPlus.Dev$ 5⁄11⁄90 / 0125-Re[N+1] What's in Ma-May90 < prev    next >
Encoding:
Text File  |  1990-05-11  |  850 b   |  27 lines  |  [TEXT/GEOL]

  1. Item    4834305                         10-May-90        01:01PDT
  2.  
  3. From:   MUYSVASOVIC                     ACE - Jean-Denis Muys-Vasovic
  4.  
  5. To:     CPLUS.APPLE$                    C++ Interest List--Apple Employees
  6.         CPLUS.DEV$                      C++ Interest List--Developers
  7.  
  8. Sub:    Re[N+1] What's in Main?
  9.  
  10. Another PITFALL with C++ segmentation (though slightly unrelated) is the
  11. following: you have a segment holding code executed at interrupt time. It must
  12. stay resident. its name is INTERRUPT. The following doesn't work:
  13.  
  14. #pragma segment INTERRUPT   // MUST be RESIDENT!!
  15. void dangerous(void)
  16. {
  17. ... whatever ...
  18. }
  19.  
  20. this procedure is placed in a segment named "INTERRUPT   // MUST be RESIDENT!!"
  21. which IS NOT resident. The lesson: don't COMMENT the preprocessor statements.
  22.  
  23. Hope that helps somebody around here!!!
  24.  
  25. Jean-Denis
  26.  
  27.